using System.Collections.Generic;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class NpcCheckAimingState : AIConditionBaseNode
    {
        public BBParameter<CompareType> compareType = CompareType.Equal;
        public BBParameter<AimingState> compareAimingState = AimingState.None;

        protected override bool OnCheck()
        {
            AimingState aimingState = _entity.data.aimingState;
            switch (compareType.value)
            {
                case CompareType.Equal:
                    return aimingState == compareAimingState.value;
                case CompareType.NotEqual:
                    return aimingState != compareAimingState.value;
            }
            return false;
        }
    }
}